Optimal. Leaf size=97 \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) (a b f-2 a c e+b c d)}{2 a c \sqrt{b^2-4 a c}}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}+\frac{d \log (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.200432, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1663, 1628, 634, 618, 206, 628} \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) (a b f-2 a c e+b c d)}{2 a c \sqrt{b^2-4 a c}}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}+\frac{d \log (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1663
Rule 1628
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{d+e x^2+f x^4}{x \left (a+b x^2+c x^4\right )} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{d+e x+f x^2}{x \left (a+b x+c x^2\right )} \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{d}{a x}+\frac{-b d+a e-(c d-a f) x}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=\frac{d \log (x)}{a}+\frac{\operatorname{Subst}\left (\int \frac{-b d+a e-(c d-a f) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a}\\ &=\frac{d \log (x)}{a}-\frac{(c d-a f) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a c}-\frac{(b c d-2 a c e+a b f) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a c}\\ &=\frac{d \log (x)}{a}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}+\frac{(b c d-2 a c e+a b f) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a c}\\ &=\frac{(b c d-2 a c e+a b f) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a c \sqrt{b^2-4 a c}}+\frac{d \log (x)}{a}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}\\ \end{align*}
Mathematica [A] time = 0.143222, size = 178, normalized size = 1.84 \[ \frac{-\log \left (-\sqrt{b^2-4 a c}+b+2 c x^2\right ) \left (c d \sqrt{b^2-4 a c}-a f \sqrt{b^2-4 a c}+a b f-2 a c e+b c d\right )+\log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right ) \left (-c d \sqrt{b^2-4 a c}+a f \sqrt{b^2-4 a c}+a b f-2 a c e+b c d\right )+4 c d \log (x) \sqrt{b^2-4 a c}}{4 a c \sqrt{b^2-4 a c}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.008, size = 165, normalized size = 1.7 \begin{align*}{\frac{d\ln \left ( x \right ) }{a}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) f}{4\,c}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) d}{4\,a}}+{e\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bd}{2\,a}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bf}{2\,c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.63331, size = 683, normalized size = 7.04 \begin{align*} \left [\frac{4 \,{\left (b^{2} c - 4 \, a c^{2}\right )} d \log \left (x\right ) +{\left (b c d - 2 \, a c e + a b f\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c +{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) -{\left ({\left (b^{2} c - 4 \, a c^{2}\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (a b^{2} c - 4 \, a^{2} c^{2}\right )}}, \frac{4 \,{\left (b^{2} c - 4 \, a c^{2}\right )} d \log \left (x\right ) + 2 \,{\left (b c d - 2 \, a c e + a b f\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) -{\left ({\left (b^{2} c - 4 \, a c^{2}\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (a b^{2} c - 4 \, a^{2} c^{2}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17434, size = 131, normalized size = 1.35 \begin{align*} \frac{d \log \left (x^{2}\right )}{2 \, a} - \frac{{\left (c d - a f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, a c} - \frac{{\left (b c d + a b f - 2 \, a c e\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} a c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]